#ifndef SPHERE_H
#define SPHERE_H

#include "shape.h"

class Sphere : public Shape
{

    double _radius;

public:
    Sphere(QString name,
           double radius,
           double refraction,
           double diffusion,
           double specularity,
           double glossy,
           double roughness,
           Vector emission,
           Vector absorbtion,
           Vector position,
           Vector rotation);

    double radius() const;
    void setRadius(double value);
    virtual inline bool intersect(const Ray &ray,
                          double *distance,
                          Vector *normal) const;
     virtual bool inside(const Vector& dot) const;
};

QDataStream &operator<<(QDataStream &, const Sphere &);
QDataStream &operator>>(QDataStream &, Sphere &);

#endif // SPHERE_H
